const Subscription = require('egg').Subscription;

class Test1 extends Subscription {
  // 通过 schedule 属性来设置定时任务的执行间隔等配置
  static get schedule() {
    return {
      interval: '1m',
      type: 'worker',
      immediate: true,
      disable: true,
    };
  }

  // subscribe 是真正定时任务执行时被运行的函数
  async subscribe() {
    console.log('aaaaaaaaaa');
  }
}

module.exports = Test1;
